home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #9 / Amiga Plus CD - 2004 - No. 09.iso / amigaplus / tools / dev_libs / feelin040718 / sources / shade / private.h < prev    next >
C/C++ Source or Header  |  2004-08-03  |  5KB  |  141 lines

  1. /*
  2.     FC_Shade Header
  3. */
  4.  
  5. /***************************************************************************/
  6. /*** includes **************************************************************/
  7. /***************************************************************************/
  8.  
  9. #include <intuition/intuition.h>
  10. #include <libraries/feelin.h>
  11.  
  12. #include <proto/exec.h>
  13. #include <proto/layers.h>
  14. #include <proto/graphics.h>
  15. #include <proto/intuition.h>
  16. #include <proto/utility.h>
  17. #include <proto/feelin.h>
  18.  
  19. /***************************************************************************/
  20. /*** shared variables ******************************************************/
  21. /***************************************************************************/
  22.  
  23. extern struct FeelinBase           *FeelinBase;
  24. #define       SysBase               FeelinBase -> SYS
  25. #define       LayersBase            FeelinBase -> Layers
  26. #define       GfxBase               FeelinBase -> Graphics
  27. #define       IntuitionBase         FeelinBase -> Intuition
  28. #define       UtilityBase           FeelinBase -> Utility
  29.  
  30. extern struct FeelinClass          *GadgetClass;
  31. extern ULONG                        FC_Area_Offset;
  32. extern ULONG                        FC_Gadget_Offset;
  33.  
  34. /***************************************************************************/
  35. /*** class *****************************************************************/
  36. /***************************************************************************/
  37.  
  38. struct LocalObjectData
  39. {
  40.     FAreaData                      *AreaData;
  41.  
  42.     UBYTE                           Flags;
  43.     UBYTE                           LastDrawn;
  44.     UBYTE                           GadW;
  45.     UBYTE                           GadH;
  46.  
  47.     FObject                         Gad_Close;
  48.     FObject                         Gad_Iconify;
  49.     FObject                         Gad_Zoom;
  50.     FObject                         Gad_Depth;
  51.     FObject                         Gad_Dragbar;
  52.     FObject                         Gad_Size;
  53.  
  54.     FNotifyHandler                 *nn_window_active;
  55.     FNotifyHandler                 *nn_window_title;
  56.  
  57.     FPalette *                      AScheme;
  58.     FPalette *                      IScheme;
  59. };
  60.  
  61. enum    {
  62.  
  63.         FV_Shade_LastDrawn_None,
  64.         FV_Shade_LastDrawn_Active,
  65.         FV_Shade_LastDrawn_Inactive
  66.  
  67.         };
  68.  
  69. #define FF_SHADE_BUFFER                         (1L << 0)
  70. #define FF_SHADE_ZOOM_IS_ICONIFY                (1L << 1)
  71.  
  72. /***/
  73.  
  74. struct GAD_LocalObjectData
  75. {
  76.     FAreaData                    *AreaData;
  77.     UBYTE                           Type;
  78.     UBYTE                           Flags;
  79.     UWORD                           _pad0;
  80.     APTR                            Gadget;
  81. //  the following is only used by title bar gadget.
  82.     FObject                       TDisplay;
  83.     STRPTR                          Prep[2];
  84. };
  85.  
  86. /***************************************************************************/
  87.  
  88. #define TICKNESS                    5
  89. #define TITLEX1                     10
  90. #define TITLEY1                     3
  91. #define TITLEX2                     10
  92. #define TITLEY2                     3
  93. #define SIZE                        (TICKNESS * 4)
  94.  
  95. enum {  FV_GadgetType_Close = 1,
  96.         FV_GadgetType_Iconify,
  97.         FV_GadgetType_Dragbar,
  98.         FV_GadgetType_Zoom,
  99.         FV_GadgetType_Depth,
  100.         FV_GadgetType_Size                      };
  101.  
  102. enum {  FA_Gadget_Type  = FCCA_BASE             };
  103.  
  104. enum {  FM_Gadget_Active = FCCM_BASE,
  105.         FM_Gadget_ZoomWindow,
  106.         FM_Gadget_DepthWindow                   };
  107.  
  108. #define FF_Draw_Title                           FF_Draw_Custom_1
  109. #define FF_Draw_Active                          FF_Draw_Custom_2
  110. /*
  111. struct LayerHookMsg
  112. {
  113.    struct Layer                    *Layer;
  114.    struct FeelinRect                Rect;
  115.    LONG                             OffsetX;
  116.    LONG                             OffsetY;
  117. };
  118.  
  119. struct BackFillHook
  120. {
  121.    struct MinNode                   h_MinNode;
  122.    ULONG                           (*h_Entry)();
  123.    ULONG                           (*h_SubEntry)();
  124.    APTR                             h_Data;
  125.    ULONG                            Shine;
  126.    ULONG                            Fill;
  127.    ULONG                            Shadow;
  128. };
  129. */
  130. /*** Prototypes ************************************************************/
  131.  
  132. struct RastPort *       CreateRPBitMap(UWORD Width,UWORD Height,struct Screen *Scr);
  133. void                    DeleteRPBitMap(struct RastPort *rpb);
  134. struct FeelinRender *   CreateRenderBuffer(UWORD Width,UWORD Height,struct FeelinRender *Friend);
  135. void                    DeleteRenderBuffer(struct FeelinRender *Render);
  136.  
  137. //SAVEDS ASM struct RastPort * Shade_Erase(REG_A0 struct BackFillHook *Hook,REG_A2 struct RastPort *rp,REG_A1 struct LayerHookMsg *Msg);
  138.  
  139. #define _Line(x1,y1,x2,y2)    _Move(x1,y1); _Draw(x2,y2)
  140.  
  141.